//
//  IncomingListEntity.m
//  HYApp
//
//  Created by Jianbo Cai on 2020/8/27.
//  Copyright © 2020 Unidax. All rights reserved.
//

#import "IncomingListEntity.h"
#import "NSString+Extra.h"

@implementation IncomingListEntity

+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper {
    return @{
             @"ID": @"id"
             };
}

- (void)setType:(NSString *)type {
    _type = type;
    self.isDeposit = ([self.type rangeOfString:@"DEPOSIT"].location != NSNotFound);
    self.isDigital = ([self.type rangeOfString:@"DIGITAL"].location != NSNotFound);
}

- (void)setDate:(NSString *)date {
    _date = [date timespToUTCFormat:@"yyyy-MM-dd HH:mm:ss"];
}

@end
